﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Web;

namespace XQ.Framework.core
{
    public class EncodingHelper
    {
        public static byte[] getBytes(string str)
        {
            return Encoding.Default.GetBytes(str);
        }

        public static string HtmlDecode(string s)
        {
            return HttpUtility.HtmlDecode(s);
        }

        public static string HtmlEncode(string s)
        {
            return HttpUtility.HtmlEncode(s);
        }

        public static string UrlDecode(string s)
        {
            return HttpUtility.UrlDecode(s);
        }

        public static string UrlEncode(string s)
        {
            return HttpUtility.UrlEncode(s);
        }
    }
}
